<?php

class Application_Form_Comment extends Zend_Form
{
    public function init()
    {
        $this->setName('Comment');

        $comment_id = new Zend_Form_Element_Hidden('comment_id');
        $comment_id->addFilter('Int');

        $title = new Zend_Form_Element_Text('title');
        $title->setLabel('Tiêu đề')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
        
             
        $content = new Zend_Form_Element_Text('content');
        $content->setLabel('Mô tả')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $full_name = new Zend_Form_Element_Textarea('full_name');
        $full_name->setLabel('Nội dung')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
                            
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'AddButton');

        $cancel = new Zend_Form_Element_Submit('cancel');
        $cancel->setAttrib('id', 'CancelButton');
        
        

        $this->addElements(array($title, $content, $full_name, $comment_id, $submit, $cancel));
    }
}